<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="sims.*" %>
<% String contextPath = request.getContextPath(); %>
<%
	List<StockRecord> list = (List<StockRecord>)request.getAttribute("list");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="<%= contextPath %>/css/style.css" type="text/css" />
		<link rel="stylesheet" href="<%= contextPath %>/css/list.css" type="text/css" />
		<title>Stock List</title>
	</head>
	<body>
		<table border="1">
			<tr>
				<td>Number</td>
				<td>Quantity</td>
				<td>操作</td>
			</tr>
			<% for (StockRecord c : list) { %>
			<tr>
				<td><%= c.getNumber() %></td>
				<td><%= c.getQuantity() %></td>
				<td>
					<a href="StockEditServlet?id=<%= c.getId() %>">変更</a>
					&nbsp;|&nbsp;
					<a href="StockDeleteServlet?id=<%= c.getId() %>">削除</a>
				</td>
			</tr>
			<% } %>
		</table>
		<p>
			<a class="button" href="./">戻る</a>
		</p>
	</body>
</html>